* Don't show useless empty preview on new page creation
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 24 Dec 2005 08:23:32 +0000 (08:23 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 24 Dec 2005 08:23:32 +0000 (08:23 +0000)
RELEASE-NOTES
includes/EditPage.php

index 2fdb7d6..0010934 100644 (file)
@@ -348,6 +348,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * Fix raw sitenotice display on database error
 * Fix autoconfirm check for old accounts
 * (bug 4368) Don't show useless empty preview on new section creation
+* Don't show useless empty preview on new page creation
 
 
 === Caveats ===
index 5b20c98..570641c 100644 (file)
@@ -304,7 +304,7 @@ class EditPage {
        function previewOnOpen() {
                global $wgUser;
                return $this->section != 'new' &&
-                       ( $wgUser->getOption( 'previewonfirst' ) ||
+                       ( ( $wgUser->getOption( 'previewonfirst' ) && $this->mTitle->exists() ) ||
                                ( $this->mTitle->getNamespace() == NS_CATEGORY &&
                                        !$this->mTitle->exists() ) );
        }